#ifndef AST_DECLARATIONS_PARAMETER_DECLARATION_H
#define AST_DECLARATIONS_PARAMETER_DECLARATION_H

#include "../ASTNode.h"
class DeclarationSpecifiers;
class Declarator;
class AbstractDeclarator;

/*
C99 6.7.5
parameter-declaration:
		declaration-specifiers   declarator
		declaration-specifiers   abstract-declarator(opt)
*/
class ParameterDeclaration : public ASTNode
{
protected:
	ParameterDeclaration(void)
		: ASTNode(ASTNode::parameter_declaration){}
public:
	ParameterDeclaration(DeclarationSpecifiers *pDeclSpec, Declarator *pDecltor)
		: ASTNode(ASTNode::parameter_declaration)
		, m_pDeclSpecs(pDeclSpec)
		, m_pDeclarator(pDecltor)
		, m_pAbstractDecl(NULL) {};
	
	ParameterDeclaration(DeclarationSpecifiers *pDeclSpec, AbstractDeclarator *pAbDecltor = NULL)
		: ASTNode(ASTNode::parameter_declaration)
		, m_pDeclSpecs(pDeclSpec)
		, m_pDeclarator(NULL)
		, m_pAbstractDecl(pAbDecltor){};


	virtual ~ParameterDeclaration(void);

	virtual void							codeGen();

protected:
	DeclarationSpecifiers *					m_pDeclSpecs;
	Declarator *							m_pDeclarator;	//may be NULL
	AbstractDeclarator *					m_pAbstractDecl;	//may be NULL
};


#endif


